# -*- coding: utf-8 -*-

from panorama_1 import Stitcher
import imutils
import cv2
import os
import numpy as np

filePath='../Merge/pic/'
print('filePath='+filePath)
pathDir=os.listdir(filePath)
fileLists=[]
for allDir in pathDir:
    file=os.path.join('%s%s'%(filePath,allDir))
    fileLists.append(file)
print(fileLists,len(fileLists))
for index in np.arange(0,len(fileLists)):
    print(index)


"""
imageA=cv2.imread('./pic/1.jpg')
imageB=cv2.imread('./pic/2.jpg')
imageC=cv2.imread('./pic/3.jpg')
imageD=cv2.imread('./pic/4.jpg')
imageA=imutils.resize(imageA,width=400)
imageB=imutils.resize(imageB,width=400)
#拼接图像
stitcher = Stitcher()
(result, vis) = stitcher.stitch([imageA, imageB], showMatches=True)
#显示
#cv2.imshow("Image A",imageA)
#cv2.imshow("Image B",imageB)
cv2.imshow("keypoint Matches",vis)
cv2.imshow("Result",result)
cv2.waitKey(0)
"""
